# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=lrs
pkgver=072
_pkgver=${pkgver/./}
pkgrel=1
pkgdesc='C implementation of the reverse search algorithm for vertex enumeration/convex hull problems'
arch=(loong64 x86_64)
url='http://cgm.cs.mcgill.ca/~avis/C/lrs.html'
license=(GPL)
depends=(gmp)
source=(http://cgm.cs.mcgill.ca/~avis/C/lrslib/archive/lrslib-$_pkgver.tar.gz
        lrs-system-cflags.patch)
sha256sums=('fc48754a1ded1d8445d40ecfbe3546e4f27d53aaee95dc2c8c0c79fb9cd532f0'
            '617ed06ae2584ef3349a3b1f6ab1a4acd11f18211394458498e1223a65bb0e73')

prepare() {
  cd lrslib-$_pkgver
  patch -p1 -i ../lrs-system-cflags.patch # Use system CFLAGS/LDFLAGS
}

build() {
  cd lrslib-$_pkgver
  make
}

package() {
  cd lrslib-$_pkgver
  make DESTDIR="$pkgdir" prefix=/usr install
}
